package com.tbit.main.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * @Author: chen
 * @Description: 回收记录表
 * @Date: 创建于 15:16 2023/2/9
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("recoverylog")
public class RecoveryLog {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer recoveryId;
    /**
     * 区域ID
     */
    private Integer accountId;
    /**
     * 设备ID
     */
    private Integer machineId;
    /**
     * 车辆编号
     */
    private String userCode;
    /**
     * 中控编号
     */
    private String machineNO;
    /**
     * 开始时间
     */
    private Date startTime;
    /**
     * 开始经度
     */
    private Double startLo;
    /**
     * 开始纬度
     */
    private Double startLa;
    /**
     * 结束时间
     */
    private Date endTime;
    /**
     * 结束经度
     */
    private Double endLo;
    /**
     * 结束纬度
     */
    private Double endLa;
    /**
     * 回收人id
     */
    private Integer recoveryUserId;
    /**
     * 回收人名称
     */
    private String recoveryUserName;
    /**
     * 入库人ID
     */
    private Integer stockUserId;
    /**
     * 入库人名称
     */
    private String stockUserName;
    /**
     * 状态
     */
    private Integer state;
    /**
     * 备注
     */
    private String remark;
    /**'库房id'**/
    private Integer stockId;
    /**'库房名称'**/
    private String stockName;
    /**'入库时间'**/
    private Date stockTime;
    /**'出库人id'**/
    private Integer outStockUserId;
    /**'出库人名称'**/
    private String outStockUserName;
    /**'出库时间'**/
    private Date outStockTime;
    /**
     * 距离
     */
    @TableField(exist = false)
    private Integer distance;

    public RecoveryLog(Integer accountId, Integer machineId, String userCode,
                       String machineNO, Date startTime, Double startLo, Double startLa,
                       Integer recoveryUserId, String recoveryUserName, Integer state) {
        this.accountId = accountId;
        this.machineId = machineId;
        this.userCode = userCode;
        this.machineNO = machineNO;
        this.startTime = startTime;
        this.startLo = startLo;
        this.startLa = startLa;
        this.recoveryUserId = recoveryUserId;
        this.recoveryUserName = recoveryUserName;
        this.state = state;
    }


}
